﻿namespace BM.Tools.WebControls.MForm.Controls.Additions
{
    using System.Web.UI;

    /// <summary>
    /// A control that is a definition for a static text part of the description
    /// </summary>
    [ParseChildren(true, "Value")]
    public class TextDescription : DescriptionChunk
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="TextDescription"/> class. 
        /// </summary>
        public TextDescription()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="TextDescription"/> class. 
        /// </summary>
        /// <param name="value">
        /// The value.
        /// </param>
        public TextDescription(string value)
        {
            Value = value;
        }

        /// <summary>
        /// Gets or sets Value.
        /// </summary>
        /// <value>
        /// The value.
        /// </value>
        [PersistenceMode(PersistenceMode.InnerDefaultProperty)]
        public string Value
        {
            get;
            set;
        }

        /// <summary>
        /// Gets the description chunk class name
        /// </summary>
        public override string ClassName
        {
            get
            {
                return "BM.TextDescription";
            }
        }
    }
}